#include "TestCase.h"

std::map < std::string, std::vector<TestCase>> g_AllCases;

#define STD std
#define NS "std"
#include "AllCase.inc.h"
#undef STD
#undef NS

#define STD SSTD
#define NS "cpp"
#include "AllCase.inc.h"
#undef STD
#undef NS

int main()
{
	for (auto& p : g_AllCases)
	{
		std::cout << std::string(10, '#') << std::endl;
		if (p.second.size() == 0)
		{
			std::cout << "ignore case: " << p.first << std::endl;
			continue;
		}
		std::cout << "test case: " << p.first << std::endl;
		for (auto& c : p.second)
		{
			c.run();
		}
		//run again
		for (auto& c : p.second)
		{
			c.run();
		}
		if (p.second.size() == 1)
		{
			std::cout << "case: " << p.first << std::endl;
			std::cout << "only one round" << std::endl;
			p.second.front().output();
		}
		else
		{
			auto& first = p.second.front();
			for (auto iter = p.second.begin() + 1; iter != p.second.end(); ++iter)
			{
				first.compare(*iter);
			}
		}
	}
	return 0;
}
